<template>
    <div>
        <h4>页面B</h4>
        <textarea v-model="input2"></textarea>
        <button @click="backOne">before</button>
        <button @click="toC">next</button>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter} from 'vue-router';
import { useStore } from '@/store';

const input2 = ref(null);
const router = useRouter();
const mainStore = useStore();

const backOne = () => {
    router.push('/pageA');
}

const toC = () => {
    mainStore.setInput2(input2.value);
    router.push('/pageC');
}
</script>

<style lang="scss" scoped>

</style>